<?php
/**
 * User: @lose
 * Date: 2020/7/28
 * Time: 2:00 下午
 */

use Illuminate\Routing\Router;

Route::group([
    'prefix'        => 'admin/blackCard',
    'namespace'     => 'Beerus\\Modules\\BlackCard\\Controllers',
    'middleware'    => ['web', 'admin'],
], function (Router $router) {

    $router->get('/', 'WikiController@index');
    $router->put('/{wikiId}', 'WikiController@setBlack');
    $router->post('/uploadWiki', 'WikiController@uploadWiki');

    // 好好住商品
    $router->get('/goods/index', 'GoodsController@index');
    $router->get('/goods/index/create', 'GoodsController@create');
    $router->post('/goods/index/submit', 'GoodsController@submit');
    $router->put('/goods/index/{id}', 'GoodsController@setBlack');

    //黑卡用户
    $router->get('/user/index', 'UserController@index');

    // 黑卡返佣订单
    $router->get('/order/index', 'OrderController@index');
    $router->put('/order/index/{id}', 'OrderController@changeRateAmount');
    $router->post('/order/{id}/setStatus', 'OrderController@setStatus');
    $router->post('/order/{id}/refresh', 'OrderController@refresh');

    // 创建订单分两步，第一步填写订单号，订单来源。第二步在提取订单信息
    $router->get('/order/index/create', 'OrderController@create');
    // 提取订单信息
    $router->post('/order/orderSubmit', 'OrderController@orderSubmit');

    // 黑卡广播位
    $router->get('/tips/index', 'TipsController@index');
    //添加
    $router->get('/tips/index/create', 'TipsController@edit');
    //修改
    $router->get('/tips/index/{id}/edit', 'TipsController@edit');
    //添加、修改信息提交
    $router->post('/tips/index/save', 'TipsController@editSubmit');
    //删除提示信息
    $router->delete('/tips/index/{id}', 'TipsController@del');

    /** 黑卡banner管理 start **/
    $router->get('/banner/index', 'BannerController@bannerList');
    $router->get('/banner/index/create', 'BannerController@addBanner');
    $router->get('/banner/index/{id}/edit', 'BannerController@editBanner');
    $router->post('/banner/index/save', 'BannerController@save');
    $router->delete('/banner/index/{id}', 'BannerController@delBanner');
    $router->post('/banner/sort', 'BannerController@sort');
    /** 品牌banner管理 end **/

    // 分类排序
    $router->get('/categorysort', 'CategoryController@categoryList');
    $router->get('/categorysort/create', 'CategoryController@addCategory');
    $router->get('/categorysort/{id}/edit', 'CategoryController@editCategory');
    $router->post('/categorysort/save', 'CategoryController@saveCategory');
    $router->delete('/categorysort/{id}', 'CategoryController@delCategory');
    $router->post('/sort', 'CategoryController@sortCategory');

});